package com.tinyideatech.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tinyideatech.system.entity.SysUserRole;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Set;

public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {

    @Select("select role_key from sys_role where role_id in (select role_id from sys_user_role where user_id = #{userId})")
    Set<String> selectRoleKeysByUserId(@Param("userId") Long userId);

}